package com.byit.domain;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统菜单列表
 * </p>
 *
 * @author wangx
 * @since 2018-12-11
 */
@Data
@TableName("sys_menu")
public class SysMenu extends Model<SysMenu> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 父级菜单
     */
    @TableField("parent_id")
    private Long parentId;
    /**
     * 菜单名
     */
    @TableField("menu_name")
    private String menuName;
    /**
     * 菜单全路径
     */
    @TableField("menu_url")
    private String menuUrl;
    /**
     * 排序编号
     */
    @TableField("order")
    private Integer order;
    /**
     * 菜单类型（M目录 C菜单 F按钮）
     */
    @TableField("menu_type")
    private String menuType;
    /**
     * 权限标识
     */
    @TableField("perms")
    private String perms;
    /**
     * 插入时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 级别
     */
    @TableField("level")
    private Integer level;
    /**
     * 图标
     */
    @TableField("icon")
    private String icon;
    /**
     * 操作人Id
     */
    @TableField("operation_id")
    private Long operationId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysMenu{" +
                ", id=" + id +
                ", parentId=" + parentId +
                ", menuName=" + menuName +
                ", menuUrl=" + menuUrl +
                ", order=" + order +
                ", perms=" + perms +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", level=" + level +
                ", icon=" + icon +
                ", operationId=" + operationId +
                "}";
    }
}
